﻿using System.Data;

namespace Tms.BLL
{
    public class ncs_detail
    {
        private readonly DAL.ncs_detail dal = new DAL.ncs_detail();
        
        //是否存在该记录
        public bool Exists(int id)
        {
            return dal.Exists(id);
        }
        
        //增加一条数据
        public int Add(Model.ncs_detail model)
        {
            return dal.Add(model);
        }

        //增加一条数据，若已存在则更新
        public int Add2(Model.ncs_detail model)
        {
            return dal.Add2(model);
        }

        //更新一条数据
        public bool Update(Model.ncs_detail model)
        {
            return dal.Update(model);
        }

        //删除一条数据
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        //获取一个实体对象
        public Model.ncs_detail GetModel(int id)
        {
            return dal.GetModel(id);
        }

        //获取查询分页数据
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string strOrder, out int recordCount)
        {
            return dal.GetList(pageSize, pageIndex, strWhere, strOrder, out recordCount);
        }

        //通用
        public DataSet GetList(string strWhere, string strOrder)
        {
            return dal.GetList(strWhere, strOrder);
        }

        //通用
        public DataSet GetList(string strSQL)
        {
            return dal.GetList(strSQL);
        }


    }
}
